<template lang="pug">
  .top-nav.pos-a
    a.nav-link(:href="recommendUrl", target="_blank") 推荐
    a.nav-link(:href="homeUrl", target="_blank") 个人中心
</template>

<script>
import { mapGetters } from 'vuex'
import { setTimeout } from 'timers';
export default {
  data() {
    return {
      recommendUrl: '',
      homeUrl: ''
    }
  },
  beforeMount() {
    this.recommendUrl = `${$globalconfig.URLS.HOME}photographer/${this.getUserId}`
    this.homeUrl = `${$globalconfig.URLS.HOME}`
    this.name()
  },
  computed: {
    ...mapGetters(['panoInfo']),
    getUserId() {
      if(this.panoInfo) {
        return this.panoInfo.user_id
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '../../../assets/styles/color.styl'
.top-nav
  left: 50%
  top 20px
  transform: translateX(-50%)
  z-index: 10
  .nav-link
    font-size: 16px
    color: #fff
    padding: 4px 20px
    text-shadow: 2px -1px 2px #333
</style>

